CHECK FOR UNDERSTANDING: Let's take another look at the if-statements and their comparison symbols.

We've used == to test if two values are equal, but now we can test if values are greater or less than each other!

  • Click Run and guess the number. Then use the code to answer the questions.

Greater Than: If your guess is > the random number, the sprite says, "Nope! Too high!"

Less Than: If your guess is < the random number, the sprite says, "Nope! Too low!"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)